<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>
        学生信息管理平台
    </title>
    <head th:include="common/css :: common_css"></head>


</head>
<body>

<div class="banner" th:include="common/header :: common_header"></div>
<div class="page">
    <div class="box mtop">
        <div class="leftbox" th:include="teacher/left :: common_left">
        </div>
        <div class="rightbox">
            <h2 class="mbx">班级管理 &gt; 我的班级</h2>
            <div class="morebt" th:include="teacher/banner :: common_banner">
            </div>
            <div class="cztable">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <th style="text-align:center;" width="10%">班级名称</th>
                        <th style="text-align:center;" width="10%">总人数</th>
                        <th style="text-align:center;" width="10%">班级QQ群</th>
                        <th width="20%">宣传语</th>
                        <th style="text-align:center;" width="5%">操作</th>
                    </tr>

                    <tr style="height: 28px" class="tdbg" align="center">
                        <td align="left"><a href="student_list.html">BJ-JAVA-1715B</a></td>
                        <td align="center">29</td>
                        <td align="left">705113346</td>
                        <td align="left">学编程不敲代码？就好像不下水能学会游泳一样。</td>
                        <td align="center"><a href="#" onclick="$('#edit-table').show()">修改</a></td>
                    </tr>
                    <tr style="height: 28px" class="tdbg" align="center">
                        <td align="left"><a href="student_list.html">BJ-JAVA-1715A</a></td>
                        <td align="center">54</td>
                        <td align="left">7051133</td>
                        <td align="left">坚持到感动自己，拼搏到无能为力。</td>
                        <td align="center"><a href="#" onclick="$('#edit-table').show()">修改</a></td>
                    </tr>

                </table>
            </div>

            <div class="cztable" id="edit-table" style="display:none">


                <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="15%" align="right">
                            <div align="right">班级名称：</div>
                        </td>
                        <td><input id="Ctitle" size="20" name="Ctitle" class="input_2" value="BJ-JAVA-1715B"
                                   readonly="true"/></td>
                    </tr>
                    <tr>
                        <td width="15%" align="right">
                            <div align="right">班级QQ群：</div>
                        </td>
                        <td><input id="Ctitle" size="20" name="Ctitle" class="input_2" value="705113346"/></td>
                    </tr>
                    <tr>
                        <td width="15%" align="right">
                            <div align="right">宣传语：</div>
                        </td>
                        <td><textarea name="Ccontent" cols="80" rows="5" id="Ccontent" class="input_2">学编程不敲代码？就好像不下水能学会游泳一样。</textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <div align="center">
                                <input type="submit" value="提交"
                                       onclick="saveClick('7c50f70a-775b-4aef-8bf2-5010ec612c0d')" class="input2"/>
                                <input type="submit" value="返回" onclick="$('#edit-table').hide()" class="input2"/>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="cztable">
                <div style="padding:5px">
                    <form id="feedback-form">
                        <input type="hidden" name="pageNum" id="pageNum"/>
                        班级：<select class="input_2" name="classId">
                        <option value="">请选择</option>
                        <option value="1">BJ-JAVA-1715B</option>
                        <option value="2">BJ-JAVA-1715A</option>
                    </select>
                        姓名：<input type="text" name="stuName" class="input_2"/> <input type="button" value="查询"
                                                                                      class="input2"
                                                                                      onclick="searchFeedback(1)">
                    </form>
                </div>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" id="feedback-table">
                    <tr>
                        <th style="text-align:center;" width="15%">班级名称</th>
                        <th style="text-align:center;" width="10%">学生姓名</th>
                        <th style="text-align:center;" width="50%">反馈问题</th>
                        <th style="text-align:center;" width="50%">反馈时间</th>
                    </tr>
                </table>
                <div align="right" style="padding-right:10px">
                    当前第3页 共5页
                    <a href="javascript:void(0)">上一页</a>
                    <a href="javascript:void(0)" onclick="searchFeedback(1)">1</a>
                    <a href="javascript:void(0)" onclick="searchFeedback(2)">2</a>
                    <a href="javascript:void(0)"><span style="color:red">3</span></a>
                    <a href="javascript:void(0)" onclick="searchFeedback(4)">4</a>
                    <a href="javascript:void(0)">5</a>
                    <a href="javascript:void(0)">下一页</a>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        //        function chagePage(pageNum){
        //            $("#pageNum").val(pageNum);
        //            searchFeedback();
        //           // $("#feedback-form").submit();
        //        }
        $(function () {
            searchFeedback(1)
        })

        function searchFeedback(pageNum) {
            $("#pageNum").val(pageNum);
            $.ajax({
                url: "/teacher/feedback.html",
                data: $("#feedback-form").serialize(),
                method: "post",
                success: function (json) {
                    $("#feedback-table .tdbg").remove();
                    var str = '';
                    //i代表索引  obj第i个元素
                    $.each(json.list, function (i, obj) {
                        str += '<tr style="height: 28px" class="tdbg" align="center">\n' +
                            '                        <td align="left">' + obj.classInfo.name + '</td>\n' +
                            '                        <td align="center">' + obj.student.name + '</td>\n' +
                            '                        <td align="left">' + obj.content + '</td>\n' +
                            '                        <td align="left">' + obj.createTime + '</td>\n' +
                            '                    </tr>'
                    });
                    $("#feedback-table").append(str);
                }
            })
        }
    </script>
    <div class="footer">
        <p>
            &copy;copyright 2018 xx教育 csgb.net 版权所有 站长统计</p>
    </div>
</div>
</body>
</html>
